<?php
	class debug {
	
		function db() {
			$res = mysql_query('SELECT * FROM `errors`');
			var_dump(mysql_fetch_assoc($res));
		}
		
		function logger() {
			err::log('test', 'testerror');
		}
		
		function json() {
			//Spit out some json to test with
		
			//#1 Make the array
			$array = array(time() => 'Hey', time() + 15 => 'Yo!', time() + 25 => 'wubu2?');
			
			//#2 Encode the Json
			$jsonencoded = json_encode($array);
			
			//#3 Urlencode the Json
			$urlencoded = urlencode($jsonencoded);
			
			echo('Urlencoded: <input type="text" value=\'' . $urlencoded . '\'></input><br/><br/>');
			echo('Just JSON: <input type="text" value=\'' . $jsonencoded . '\'></input><br/><br/>');
			echo('Just array: <input type="text" value=\'');
			var_dump($array);
			echo('\'></input><br/><br/>');
		}
		
		function testRegistered($email, $authcodeOrPass) {
			echo(xw::userIsRegistered($email, $authcodeOrPass));
		}
		
		function session() {
			var_dump($_SESSION);
		}
	}
?>